package cosc617_blackteam;

/**
 * @author Laura
 * Command to set the seating strategy
 */
public class CmdSetSeatingStrat implements I_Command {
	private SeatingStrategy strat;
	private InfoAggregator infoagg;
	public CmdSetSeatingStrat(InfoAggregator infoagg, SeatingStrategy strat){
		this.infoagg = infoagg;
		this.strat = strat;
		
	}
	@Override
	public Object execute() {
		
		TableCollections tables = infoagg.getTables();
		I_SeatingStrategy strategy = strat.getStrategy(tables);
		infoagg.setSeatingStrategy(strategy);
		return null;
	}

}
